<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="language" content="zh" />
    <meta name='viewport'
        content='width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no' />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <title>移动APP下载</title>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <STYLE>
        HTML {
            OVERFLOW-X: hidden;
        }

        #foot {
            height: 50px;
            background-color: #ffffff;
            text-align: center;
            vertical-align: middle;
            width: 100%;
            z-index: 2000;
            position: fixed;
            bottom: 0
        }

        .downapp {
            float: left;
            width: 100%;
            height: 66px;
            padding-top: 16px;
            text-align: center;
        }

        .alertMessageBg {
            position: fixed;
            _position: absolute;
            width: 100%;
            height: 100%;
            left: 0;
            top: 0;
            background: #000;
            opacity: 0.8;
            -moz-opacity: 0.5;
            filter: alpha(opacity=50);
            z-index: 2001;
            display: none;
        }
    </STYLE>

</head>

<body style="text-align: center; background-color: #00b9ef; margin: 0">
    <div>
        <div style="padding-top: 3%;">
            <img src="./img/garlan.png"></img>
        </div>
        <div style="color: #ffffff; text-align: center;">
            <div>
                <!-- <SPAN style="font-size: 24px;">银丰生物集团</SPAN> -->
                <SPAN style="font-size: 24px;">嘉林集团</SPAN>
            </div>
            <!-- <div style="padding-top: 12px; padding-bottom: 8px" hidden>
                <SPAN style="font-size: 18px;">打包时间：2021-01-15 10:39:07.0</SPAN>
            </div> -->
            <div id="system" style="margin-top: 30px;">
                <span style="font-size: 24px;"></span>
                <!-- <span style="font-size: 24px;">适用系统：android</span> -->
            </div>
            <div id="caDownload" style="margin-top: 20px;display: none; ">
                <span>若您未安装ca证书：</span> <br /> <span>1、使用Safari打开本页面</span> <br />
                <span>2、点击下方的ca证书下载</span> <br /> <span>3、若是ios10.3用户，还需要在(关于本机-证书信任设置)信任本服务器</span>
                <br />
                <!-- <img src="../../img/dl/download_photo_zhengshu.png" style="height: 16px; line-height: 36px;"></img> -->
                <span id="caDownloadLink" style="font-size: 16px; color: #002d66">ca证书下载</span>
            </div>
        </div>

        <div id="foot">
            <div style="width: 100%; margin: 0 0 5 0; background-color: #ffffff;">
                <div id="d_app" class="downapp">
                    <img src="./img/download_photo_app.png" style="height: 16px; line-height: 36px;"></img>
                    <span style="font-size: 16px; color: #002d66">应用下载</span>
                </div>
            </div>
        </div>

    </div>
    <div id="showindex" class="alertMessageBg">
        <div style="float: right; position: relative; left: -15%; top: 60px;">
            <SPAN style="font-size: 18px; color: #CCEEFF;">请在浏览器中打开链接后下载！</SPAN>
        </div>
        <div style="clear: both; float: right; position: relative; left: -6%; top: 0%">
            <img id="indexpng" style="display: none;"></img>
        </div>
    </div>


    <script type="text/javascript">
        var is_weixin = false;
        //判断是否通过微信进入
        // if(navigator.userAgent.indexOf("MQQBrowser")>=0 || (navigator.userAgent.indexOf("MicroMessenger")>=0)){
        if ((navigator.userAgent.indexOf("MicroMessenger") >= 0)) {
            is_weixin = true;
        }

        var caDownload = "";
        if (caDownload.length > 0) {
            $("#caDownload").show();
            $("#caDownloadLink").bind("click", function (event) {
                if (is_weixin) {
                    $("#showindex").css("display", "block");
                    $("#indexpng").css({
                        "width": "294px",
                        "height": "210px"
                    })
                    $("#indexpng").attr("src", "../../img/dl/weixinand.png");
                    $("#indexpng").show();
                } else {
                    location.href = "";
                    $("#indexpng").hide();
                }
            });
        };

        if (/android/i.test(navigator.userAgent)) {
            $("#system span").html('适用系统：android');
            // $('.downapp span').html('安装包下载')
            $("#d_app").bind("click", function (event) {
                if (is_weixin) {
                    $("#showindex").css("display", "block");
                    $("#indexpng").css({
                        "width": "294px",
                        "height": "210px"
                    })
                    $("#indexpng").attr("src", "../../img/dl/weixinand.png");
                    $("#indexpng").show();
                } else {
                    alert('下载APP')
                    try {
                        // location.href = " ./QiXueApp.apk";
                        location.href = "http://60.216.83.250:20300/change/appVersion/QiXueApp.apk";
                    } catch (error) {
                        alert(error);
                        console.log(error);
                    }
                    $("#indexpng").hide();
                }
            });
        };

        if (/ipad|iphone|mac/i.test(navigator.userAgent)) {
            $("#system span").html('适用系统：ios');
            $("#d_app").bind("click", function (event) {
                if (is_weixin) {
                    $("#showindex").css("display", "block");
                    $("#indexpng").css({
                        "width": "294px",
                        "height": "210px"
                    })
                    $("#indexpng").attr("src", "../../img/dl/weixinios.png");
                    $("#indexpng").show();
                } else {
                    location.href = "itms-services://?action=download-manifest&url=https://gitee.com/xuyananxyn/qixueios/raw/master/demo.plist";
                    $("#indexpng").hide();
                }
            });
        };

    </script>
</body>

</html>